package com.baizhi.service.Impl;

import com.baizhi.dao.CityDao;
import com.baizhi.entity.City;
import com.baizhi.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CityServicerImpl implements CityService {

    private CityDao cityDao;
    @Autowired
    public CityServicerImpl(CityDao cityDao){
        this.cityDao=cityDao;
    }
    @Override
    public List<City> queryAll() {
        return this.cityDao.queryAll();
    }

    @Override
    public City insert(City city) {
    this.cityDao.insert(city);
    return city;
    }

    @Override
    public City queryById(Integer id) {
        return this.cityDao.queryById(id);
    }
}
